#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <qtcpsocket.h>
#include <QHostAddress>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QDebug>



QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE
struct user
{
    QString username;
    QString id;
};

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_loginButton_clicked();


private:
    Ui::Widget *ui;
    QTcpSocket *socket;
    QString ip;
    QString port;
    QNetworkAccessManager manager;
    user userSelf;

};
#endif // WIDGET_H
